<?php

class Registro extends CFormModel {

    public $nome;
    public $email;
    public $senha;
    public $confirmaSenha;
    public $verifyCode;

    /**
     * Declares the validation rules.
     * The rules state that username and password are required,
     * and password needs to be authenticated.
     */
    public function rules() {
        return array(
            array('nome, email, senha, confirmaSenha', 'required'),
            array('senha', 'compare', 'compareAttribute'=>'confirmaSenha'),
            array('verifyCode', 'captcha', 'allowEmpty' => !CCaptcha::checkRequirements()),
        );
    }

    /**
     * Declares attribute labels.
     */
    public function attributeLabels() {
        return array(
            'nome' => 'Nome',
            'email' => 'E-mail',
            'senha' => 'Senha',
            'confirmaSenha' => 'Confirmar Senha',
            'verifyCode' => 'Código de Ativação',
        );
    }

}

?>
